import api from "./api";
import type Typings from "@/typings";

export default {
  projectListApi: (
    data: Typings.Common.plainObj = {},
    config: Typings.Common.plainObj = {}
  ) => {
    const url = "/project/list";
    return api.get(url, data, { ...config });
  },

  projectAddApi: (
    data: Typings.Common.plainObj = {},
    config: Typings.Common.plainObj = {}
  ) => {
    const url = "/project/add";
    return api.post(url, data, { ...config, openLoading: true });
  },

  projectUpdateApi: (
    data: Typings.Common.plainObj = {},
    config: Typings.Common.plainObj = {}
  ) => {
    const url = "/project/update";
    return api.post(url, data, { ...config, openLoading: true });
  },

  projectCheckApi: (
    data: Typings.Common.plainObj = {},
    config: Typings.Common.plainObj = {}
  ) => {
    const url = "/project/check";
    return api.get(url, data, { ...config });
  },

  projectRemoveApi: (
    data: Typings.Common.plainObj = {},
    config: Typings.Common.plainObj = {}
  ) => {
    const url = "/project/remove";
    return api.get(url, data, { ...config });
  },
};
